//
//  MatchCell.m
//  Match
//
//  Created by lanou3g on 15/5/31.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "MatchCell.h"

@implementation MatchCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setNewsModel:(NewsModel *)newsModel{
    if (_newsModel != newsModel) {
        _newsModel = newsModel;
    }
    
    if ([newsModel.statusId.class isSubclassOfClass:[NSNumber class]]) {
        newsModel.statusId = [NSString stringWithFormat:@"%@",newsModel.statusId];
    }
    if ([newsModel.statusId isEqualToString:@"1"]) {
        self.clockImageView.hidden = NO;
        self.leftLabel.hidden =YES;
        self.rightLabel.hidden = YES;
    }else
    {
        self.leftLabel.hidden = NO;
        self.rightLabel.hidden = NO;
        self.clockImageView.hidden =YES;
    }
    self.leftLabel.text = newsModel.home_score;
    self.rightLabel.text = newsModel.away_score;
    self.leftBottomLabel.text = newsModel.home_name;
 
    self.rightBottomLabel.text = newsModel.away_name;
    self.centerLabel.text = newsModel.desc;
}
@end
